#!/bin/bash
SVN_DIR="/Users/hewesley/icyriver_at_google/config"
HOME_DIR="/Users/hewesley"

cd $HOME_DIR
echo "current dir:" `pwd`
echo "copying files..."

echo "  cp $HOME_DIR/.vimrc $SVN_DIR/mac.vimrc"
cp $HOME_DIR/.vimrc $SVN_DIR/mac.vimrc

echo "  cp $HOME_DIR/.bash_profile $SVN_DIR/mac.bash_profile"
cp $HOME_DIR/.bash_profile $SVN_DIR/mac.bash_profile

echo "  cp $HOME_DIR/.bashrc $SVN_DIR/mac.bashrc"
cp $HOME_DIR/.bashrc $SVN_DIR/mac.bashrc

echo "  cp $HOME_DIR/.jrubyrc $SVN_DIR/mac.jrubyrc"
cp $HOME_DIR/.jrubyrc $SVN_DIR/mac.jrubyrc

echo "  cp $HOME_DIR/.pryrc $SVN_DIR"
cp $HOME_DIR/.pryrc $SVN_DIR/.pryrc

echo "  cp $HOME_DIR/.screenrc $SVN_DIR"
cp $HOME_DIR/.screenrc $SVN_DIR/.screenrc

echo "  cp $HOME_DIR/.tmux.conf $SVN_DIR"
cp $HOME_DIR/.tmux.conf $SVN_DIR/.tmux.conf

echo "  cp $HOME_DIR/config.ru $SVN_DIR/config.ru"
cp $HOME_DIR/config.ru $SVN_DIR/config.ru

cd $SVN_DIR
echo "svn dir:" `pwd`

echo "svn st" 
svn st .

echo "svn add"
svn st | grep '^?' | tr '^\?' ' ' | sed 's/[ ]*//' | sed 's/[ ]/\\ /g' | xargs svn add

echo "svn ci"
svn ci .

echo "OK"
